import request from '@/utils/umiRequest';

export function look(values) {
  return request(`/api/article/${values.id}`, {
    method: 'GET',
    body: values,
  });
}

export function list(values) {
  return request('/api/article', {
    method: 'GET',
    body: values,
  });
}

export function add(values) {
  return request('/api/article', {
    method: 'POST',
    body: values,
  });
}

export function update(values) {
  return request(`/api/article/${values.id}`, {
    method: 'PUT',
    body: values,
  });
}

export function del(values) {
  return request(`/api/article/${values.id}`, {
    method: 'DELETE',
    body: values,
  });
}
